class CreateClients < ActiveRecord::Migration
  def change
    create_table :clients do |t|
      t.string     :name      , :null => false , index: { :unique => true }
      t.string     :nicks     , :null => false , :default => ''
      t.string     :secret    , :null => false
      t.timestamp  :last_seen , :null => false
      t.string     :type      , :null => false
      t.belongs_to :room      , :null => false , :index => true , :foreign_key => true

      t.timestamps :null => false
    end
  end
end
